package com.qingzhuge.verification.dto;

import com.qingzhuge.dto.request.BaseRequestDto;
import com.qingzhuge.verification.enums.EnumCloudType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.StringUtils;

import javax.validation.constraints.NotBlank;

/**
 * @author : zero.xiao
 * @description :
 * @date : 2018/9/29 0029 下午 17:09
 * @modified :
 * @since :
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class CloudAuthRequest extends BaseRequestDto {
    private static final long serialVersionUID = -635531441429804648L;
    private String token;
    /**云系统*/
    private EnumCloudType type;
    @NotBlank
    private String name;
    @NotBlank
    private String idNumber;

    public CloudAuthRequest() {
    }

    public CloudAuthRequest(String token) {
        this.token = token;
    }

    public CloudAuthRequest(@NotBlank String name, @NotBlank String idNumber) {
        this.name = name;
        this.idNumber = idNumber;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        if (StringUtils.isNotBlank(token)) {
            this.token = token.trim();
        }
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        if (StringUtils.isNotBlank(name)) {
            this.name = name.trim();
        }
    }

    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        if (StringUtils.isNotBlank(idNumber)) {
            this.idNumber = idNumber.trim();
        }
    }
}
